$(function(){
	new Vue({
		el:"#memeberListApp",
		data:{
			fullscreenLoading:false,
			tableData: [],
		},
		created:function(){
			parent.vueData.$data.hreHtml = "../couponList/index.html";
			parent.vueData.activeIndex = "6";
			parent.vueData.getLeftNav("6")
			parent.vueData.$data.categoryIndex = 1
			this.getCouponsList();
		},
		methods:{
			getCouponsList(){
				this.fullscreenLoading = true;
				axios({
					url: POSTURL.getCouponsList,
					method: 'post',
					data: {}
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						console.log(response.data);
						this.tableData = response.data.result;
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			},
			
			clickAddCoupon(){
				parent.vueData.handleOpen(66,1)
			},
			clickAddCouponType(){
				parent.vueData.handleOpen(60,1)
			}
			
		}
	})
})